import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import main from '@/components/main/main'
import category from '@/components/main/category/category'
import exam from '@/components/main/exam/examList'
import question from '@/components/main/question/questionList'
import user from '@/components/main/user/userList'
import company from '@/components/main/company/company'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    }, 
    {
      path: '/login',
      name: 'login',
      component: login
    }, 
    {
      path: '/main',
      name: 'main',
      component: main,
      redirect: '/main/category',
      children: [
        { path: 'category', component: category },
        { path: 'exam', component: exam },
        { path: 'question', component: question },
        { path: 'user', component: user },
        { path: 'company', component: company }
      ]
    }
  ]
})
